﻿namespace HuaWei.DAI
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Data;
    using System.Runtime.InteropServices;

    public interface IDataAccess
    {
        void BeginTrans();
        void CloseDatabase();
        void Commit();
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType);
        DataSet ExecuteDataSet(string exeStr, DbParameter[] outParams);
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType, string TableName);
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType, DbParameter[] inParams);
        DataSet ExecuteDataSet(string exeStr, DbParameter[] outParams, string TableName);
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType, DbParameter[] inParams, string TableName);
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType, DbParameter[] inParams, DbParameter[] outParams);
        DataSet ExecuteDataSet(string exeStr, CommandType cmdType, DbParameter[] inParams, DbParameter[] outParams, string TableName);
        bool ExecuteNonQuery(ArrayList sqls, CommandType cmdType);
        bool ExecuteNonQuery(Hashtable sqls, CommandType cmdType);
        int ExecuteNonQuery(string exeStr, CommandType cmdType);
        int ExecuteNonQuery(string proName, DbParameter[] outParams);
        int ExecuteNonQuery(string exeStr, CommandType cmdType, DbParameter[] inParams);
        int ExecuteNonQuery(string exeStr, CommandType cmdType, DbParameter[] inParams, DbParameter[] outParams);
        object ExecuteReader(string exeStr, CommandType cmdType);
        object ExecuteReader(string exeStr, DbParameter[] outParams);
        object ExecuteReader(string exeStr, CommandType cmdType, DbParameter[] inParams);
        object ExecuteReader(string exeStr, CommandType cmdType, DbParameter[] inParams, DbParameter[] outParams);
        object ExecuteScalar(string exeStr, CommandType cmdType);
        object ExecuteScalar(string exeStr, DbParameter[] outParams);
        object ExecuteScalar(string exeStr, CommandType cmdType, DbParameter[] inParams);
        object ExecuteScalar(string exeStr, CommandType cmdType, DbParameter[] inParams, DbParameter[] outParams);
        DataSet GetDs(DataSet dsSource, string invokeCode, string param);
        string Invoke(DataSet dsSource, string invokeCode, string param);
        void OpenDatabase();
        void RollBack();
        string SyncData(DataSet dsSource);
        void Update(DataTable table);
        void Update(DataSet dsUpdate, [Optional, DefaultParameterValue(true)] bool writeLog);
        void Update(DataSet dsUpdate, string strTableName);
        void Update(DataSet dsChanges, Dictionary<DataRowState, string[]> updateIndex, params string[] exeStr);

        ConcurrentProcessType CCProcessType { get; set; }

        string ConnectionString { get; set; }

        ConnectionState ConnState { get; }

        string DBType { get; set; }

        string ProductNo { get; set; }

        string ServerDBType { get; set; }
    }
}

